package com.cloud.web;

import com.cloud.service.SearchService;
import com.cloud.service.UserService;
import com.cloud.service.UserServiceClient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 *  user controller
 * @Author wangjian (jian.wang@bertelsmann.com.cn)
 * @Date 2016/11/16 9:32
 */
@RestController
@RequestMapping("/v1/search")
public class SearchController {

	@Autowired
	SearchService searchService;

	@Autowired
	UserService userService;

	@Autowired
	UserServiceClient userServiceClient;

//	@RequestMapping(value="userinfo",method= RequestMethod.GET)
//	public ResponseEntity<List<UserDto>> readUserInfo(){
//		List<UserDto> users=userService.readUserInfo();
//		return new ResponseEntity<List<UserDto>>(users, HttpStatus.OK);
//	}

	@RequestMapping(value="all",method= RequestMethod.GET)
	public String searchAll(){

		return searchService.searchAll();
	}

//	@RequestMapping(value="queryUser",method= RequestMethod.GET)
//	public List<User> userClient(){
//		List<User> users=userServiceClient.queryUserList();
//		return users;
//	}
}
